// 引入 ECharts 核心模块
import * as echarts from 'echarts';

const chartDom = document.getElementById('main');
const myChart = echarts.init(chartDom);
const option = {
    // 配置项和上面示例类似...
};
myChart.setOption(option);